import java.util.ArrayList;
import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        ArrayList<String> list = new ArrayList<>();
        int len = str.length();
        int low=0;
        int fast=0;
        while(fast<len) {
            char cur = str.charAt(fast);
            if(cur=='"') {
                fast++;
                cur=str.charAt(++fast);
                while(cur!='"') {
                    cur=str.charAt(++fast);
                }
                String ret = str.substring(low+1,fast);
                list.add(ret);
                low=fast+2;
                fast+=2;
            } else if(cur==' ') {
                String ret = str.substring(low,fast);
                list.add(ret);
                low=fast+1;
                fast+=1;
            } else {
                fast++;
            }
        }
        if(low<len) {
            list.add(str.substring(low, len));
        }
        System.out.println(list.size());
        for (String cur:
             list) {
            System.out.println(cur);
        }
    }
}
